package com.lib.framework.network

import okhttp3.OkHttpClient

/**
 * Copyright (C), 2019-2020
 * FileName: OkHttpClientFactory
 * Author: Kevin
 * Date: 2020-01-06 15:47
 * Description: OkHttpClient 的工厂类
 * History:
 * <author> <time> <version> <desc>
 * 作者姓名 修改时间 版本号 描述
 */
class OkHttpClientFactory {

    companion object {

        /**
         * 创建 OkHttpClient
         */
        fun createOkHttpClient(okHttpClientConfig: OkHttpClientConfig): OkHttpClient {
            val builder = OkHttpClient.Builder()
            okHttpClientConfig.configBuilder(builder)
            return builder.build()
        }
    }
}